LSP Ping is a function described in RFC 4379 and is an existing function for detecting an MPLS LSP data plane failure. In addition, LSP Ping also provides a mechanism for verifying the MPLS control plane against the MPLS data plane. The verification requires that the LSP is mapped to the same Forwarding Equivalence Class (FEC), at the egress node of the LSP, as the ingress node of the LSP.
BFD is a network protocol that can be used to detect faults between two forwarding engines executed by nodes in a network that are connected by a link. BFD is utilized because it provides low-overhead detection of faults even on physical media that don't support failure detection of any kind, such as Ethernet, virtual circuits, tunnels and MPLS LSPs. BFD establishes a session between two endpoint nodes over a particular link or set of links between the endpoint nodes. If more than one link exists between the nodes, multiple BFD sessions can be established to monitor each one of them.
BFD does not have a discovery mechanism. BFD sessions must be explicitly configured between the endpoint nodes. BFD operates independently of all of underlying transport mechanisms. BFD needs to be encapsulated by whatever transport it uses. For example, monitoring MPLS LSPs involves piggybacking session establishment on LSP ping messaging.
Utilizing BFD instead of LSP ping can reduce compute and storage requirements for a network device. Because the use of LSP ping is computationally intensive relative to BFD. However, BFD cannot be used to replace all of the functionality of LSP ping, such as verifying the MPLS control plane against the data plane. BFD can be used to detect a data plane failure in the forwarding path of an MPLS LSP.
In an MPLS network an LSP may be associated with any of the following FECs: (1) Resource Reservation Protocol (RSVP) LSP_Tunnel IPv4/IPv6 Session (See RFC3209), (2) Label Distribution Protocol (LDP) IPv4/IPv6 prefix (See RFC5036), (3) Virtual Private Network (VPN) IPv4/IPv6 prefix (RFC 4364), (4) Layer 2 VPN (See L2-VPN), (5) Pseudowires based on PWid FEC and Generalized PWid FEC (See RFC 4447), and (6) Border Gateway Protocol (BGP) labeled prefixes (See RFC3107).
BFD is more suitable than LSP ping for being implemented in hardware or firmware due to its fixed packet format where LSP ping has a varied format. Thus, the use of BFD for detecting MPLS LSP data plane faults has the following advantages: (1) support for fault detection for a greater number of LSPs, and (2) fast detection—detection with sub-second granularity is considered to be ‘fast detection.’ LSP Ping is intended to be used in an environment where fault detection messages are exchanged, either for diagnostic purposes or for infrequent periodic fault detection, in the order of tens of seconds or minutes. Therefore, LSP ping is not suitable for fast detection. BFD, on the other hand, is designed for sub-second fault detection intervals.